Skip to content

Add docs chat - #3749

Draft
Strift wants to merge 45 commits into
mainfrom
docs-rag-ingestion
Draft

Strift wants to merge 45 commits into
mainfrom
docs-rag-ingestion

Conversation

@Strift

@Strift Strift commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Description

This PR adds an AI assistant to the documentation website.

Chunking

  • Add a script in scripts/ingest/ to chunk and index docs content in Meilisearch
  • Add .github/workflows/ingest-chat-indexes.yml to refresh indexes when main changes

Chat frontend

  • Add AI assistant app in chat; built and deployed via the documentation-chat Vercel project
  • Add chat-loader.js that Mintlify uses to load the chat app

The script handles all environments via build-time constant injection in chat/vite.config.ts:

  • Local Mintlify dev server uses the local chat app development server (cd chat && npm run dev)
  • Mintlify preview branches will load the matching Vercel preview branch
  • Production uses the project production URL

Tooling updates

  • Add .github/workflows/lint-chat.yml to lint the chat project

Analytics

  • All conversations are tracked in PostHog LLM observability
  • Clicks on the 'thumbs up', 'thumbs down', 'regenerate' and the error-state 'Try again' buttons are sent to PostHog product analytics
  • The visitor id is the one Mintlify's PostHog snippet already stored

Environment checklist

Set these on the chat Vercel project for Preview and Production:

  • POSTHOG_PROJECT_TOKEN — Meilisearch (production), project 286966
  • POSTHOG_HOST — https://eu.i.posthog.com

Post-deployment

  • Update the Vercel project to use main as production branch and enable preview deployments

Checklist

For internal Meilisearch team member only:

For external maintainers

  • Did you use any AI tool while implementing this PR (code, tests, docs, etc.)? If yes, disclose it in the PR description and describe what it was used for. AI usage is allowed when it is disclosed.
  • Have you made sure that the title is accurate and descriptive of the changes?

@mintlify

mintlify Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated
meilisearch-documentation 🟢 Ready View Preview Dec 1, 2026, 10:12 AM

💡 Tip: Enable Automations to automatically generate PRs for you.

@coderabbitai

coderabbitai Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Too many files!

This PR contains 157 files, which is 57 over the limit of 100.

To get a review, reduce the PR to 100 files or fewer by splitting it into smaller PRs or changing its base branch.

Upgrade to a paid plan to raise the limit.

Your organization has reached its usage spending cap. Adjust your spending cap in the billing tab.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: f9746e30-53e5-4adf-90ba-aaa57b623fe6
Commits

Reviewing files that changed from the base of the PR and between d1d51e2 and 70f163a.

Files ignored due to path filters: 2

  • chat/package-lock.json is excluded by !**/package-lock.json
  • package-lock.json is excluded by !**/package-lock.json
Files selected for processing: 157

  • .env.example
  • .github/workflows/ingest-chat-indexes.yml
  • .github/workflows/test-chat.yml
  • .gitignore
  • .mintignore
  • .oxlintrc.json
  • AGENTS.md
  • CONTRIBUTING.md
  • chat-loader.js
  • chat/.env.example
  • chat/.gitignore
  • chat/AGENTS.md
  • chat/agent/__tests__/agent.test.ts
  • chat/agent/__tests__/config.test.ts
  • chat/agent/__tests__/events.test.ts
  • chat/agent/__tests__/fakes.ts
  • chat/agent/__tests__/handler.test.ts
  • chat/agent/__tests__/http.test.ts
  • chat/agent/__tests__/instructions.test.ts
  • chat/agent/__tests__/models.test.ts
  • chat/agent/__tests__/router.test.ts
  • chat/agent/__tests__/state.test.ts
  • chat/agent/agent.ts
  • chat/agent/config.ts
  • chat/agent/events.ts
  • chat/agent/handler.ts
  • chat/agent/http.ts
  • chat/agent/instructions.ts
  • chat/agent/lib/__tests__/format.test.ts
  • chat/agent/lib/__tests__/hits.test.ts
  • chat/agent/lib/__tests__/meili.test.ts
  • chat/agent/lib/__tests__/records.test.ts
  • chat/agent/lib/__tests__/releases.test.ts
  • chat/agent/lib/__tests__/rerank.test.ts
  • chat/agent/lib/__tests__/sources.test.ts
  • chat/agent/lib/format.ts
  • chat/agent/lib/hits.ts
  • chat/agent/lib/meili.ts
  • chat/agent/lib/records.ts
  • chat/agent/lib/releases.ts
  • chat/agent/lib/rerank.ts
  • chat/agent/lib/sources.ts
  • chat/agent/models.ts
  • chat/agent/posthog.ts
  • chat/agent/router.ts
  • chat/agent/state.ts
  • chat/agent/telemetry.ts
  • chat/agent/tools/__tests__/expand-page.test.ts
  • chat/agent/tools/__tests__/get-api-route.test.ts
  • chat/agent/tools/__tests__/list-releases.test.ts
  • chat/agent/tools/__tests__/search.test.ts
  • chat/agent/tools/expand-page.ts
  • chat/agent/tools/get-api-route.ts
  • chat/agent/tools/list-releases.ts
  • chat/agent/tools/search.ts
  • chat/api/chat.ts
  • chat/api/events.ts
  • chat/app/components/AskButton.tsx
  • chat/app/components/ChatComposer.tsx
  • chat/app/components/ChatHeader.tsx
  • chat/app/components/ChatPanel.tsx
  • chat/app/components/Message.tsx
  • chat/app/components/MessageActions.tsx
  • chat/app/components/Sources.tsx
  • chat/app/components/__tests__/AskButton.test.tsx
  • chat/app/components/__tests__/ChatComposer.test.tsx
  • chat/app/components/__tests__/ChatHeader.test.tsx
  • chat/app/components/__tests__/Message.test.tsx
  • chat/app/components/__tests__/MessageActions.test.tsx
  • chat/app/components/__tests__/Sources.test.tsx
  • chat/app/components/icons.tsx
  • chat/app/hooks/__tests__/useDarkMode.test.tsx
  • chat/app/hooks/__tests__/usePanelResize.test.tsx
  • chat/app/hooks/__tests__/useStickToBottom.test.tsx
  • chat/app/hooks/useDarkMode.ts
  • chat/app/hooks/usePanelResize.ts
  • chat/app/hooks/useStickToBottom.ts
  • chat/app/lib/__tests__/analytics.test.ts
  • chat/app/lib/__tests__/conversation.test.ts
  • chat/app/lib/__tests__/highlight.test.ts
  • chat/app/lib/__tests__/identity.test.ts
  • chat/app/lib/__tests__/links.test.ts
  • chat/app/lib/__tests__/parts.test.ts
  • chat/app/lib/__tests__/shadow.test.ts
  • chat/app/lib/__tests__/trace.test.ts
  • chat/app/lib/analytics.ts
  • chat/app/lib/conversation.ts
  • chat/app/lib/events.ts
  • chat/app/lib/highlight.ts
  • chat/app/lib/identity.ts
  • chat/app/lib/links.ts
  • chat/app/lib/parts.ts
  • chat/app/lib/shadow.ts
  • chat/app/lib/trace.ts
  • chat/app/main.tsx
  • chat/app/mount.tsx
  • chat/app/test-setup.ts
  • chat/app/theme.css
  • chat/evals/__tests__/checks.test.ts
  • chat/evals/__tests__/env.test.ts
  • chat/evals/__tests__/grounding.test.ts
  • chat/evals/announce.ts
  • chat/evals/cases.ts
  • chat/evals/chat.eval.ts
  • chat/evals/checks.ts
  • chat/evals/env.ts
  • chat/evals/grounding.ts
  • chat/evals/harness.ts
  • chat/evals/judges.ts
  • chat/package.json
  • chat/shared/__tests__/samples.test.ts
  • chat/shared/__tests__/source.test.ts
  • chat/shared/__tests__/user.test.ts
  • chat/shared/events.ts
  • chat/shared/samples.ts
  • chat/shared/source.ts
  • chat/shared/user.ts
  • chat/tsconfig.json
  • chat/vercel.json
  • chat/vite.config.ts
  • package.json
  • scripts/ingest/__fixtures__/docs/assets/open-api/meilisearch-openapi.json
  • scripts/ingest/__fixtures__/docs/changelog/changelog.mdx
  • scripts/ingest/__fixtures__/docs/getting_started/first_project.mdx
  • scripts/ingest/__fixtures__/docs/getting_started/overview.mdx
  • scripts/ingest/__fixtures__/docs/getting_started/sdks/javascript.mdx
  • scripts/ingest/__fixtures__/docs/navigation.json
  • scripts/ingest/__fixtures__/docs/reference/api/overview.mdx
  • scripts/ingest/__tests__/changelog.test.ts
  • scripts/ingest/__tests__/chunker.test.ts
  • scripts/ingest/__tests__/config.test.ts
  • scripts/ingest/__tests__/integration-setup.ts
  • scripts/ingest/__tests__/meilisearch-sink.integration.test.ts
  • scripts/ingest/__tests__/meilisearch-sink.test.ts
  • scripts/ingest/__tests__/plan.test.ts
  • scripts/ingest/__tests__/routes.test.ts
  • scripts/ingest/__tests__/run.test.ts
  • scripts/ingest/__tests__/sources.test.ts
  • scripts/ingest/chunk/mdast-to-text.ts
  • scripts/ingest/chunk/mdx-chunker.ts
  • scripts/ingest/chunk/route-chunker.ts
  • scripts/ingest/config.ts
  • scripts/ingest/index.ts
  • scripts/ingest/ingest.config.ts
  • scripts/ingest/package.json
  • scripts/ingest/query.ts
  • scripts/ingest/run.ts
  • scripts/ingest/sinks/jsonl.ts
  • scripts/ingest/sinks/meilisearch.ts
  • scripts/ingest/sources/changelog.ts
  • scripts/ingest/sources/mdx.ts
  • scripts/ingest/sources/openapi.ts
  • scripts/ingest/sources/snippets.ts
  • scripts/ingest/sync/plan.ts
  • scripts/ingest/tsconfig.json
  • scripts/ingest/types.ts
  • vitest.config.ts

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@Strift
Strift force-pushed the docs-rag-ingestion branch from df83869 to 120894e Compare November 4, 2026 09:23
@Strift
Strift changed the base branch from main to doc-1285-refactor-changelog-page November 4, 2026 09:23
Base automatically changed from doc-1285-refactor-changelog-page to main November 4, 2026 17:43
@Strift
Strift force-pushed the docs-rag-ingestion branch from 10c2543 to 7a8467b Compare November 12, 2026 03:33
@Strift Strift linked an issue Nov 18, 2026 that may be closed by this pull request
@vercel

vercel Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
documentation-chat Ready Ready Preview Dec 2, 2026 4:20am UTC

Request Review

Strift and others added 25 commits December 1, 2026 18:08
Vercel compiles chat/ to JavaScript but copies relative specifiers verbatim,
so a .ts import ships a function that reports READY and returns 500 on every
request with ERR_MODULE_NOT_FOUND. tsc and the tests both pass on that code
because chat/tsconfig.json sets allowImportingTsExtensions.

Add oxlint with no-restricted-imports scoped to chat/, a lint-chat CI job,
and fix the remaining type-only user.ts specifier.
api/ only deploys the chat handler, and ingestion uses the same sample and page helpers as the assistant.
The assistant, widget, and shared helpers now have unit tests, and the Meilisearch sink tests fail when no server is configured instead of skipping.
The extra file was named as if ingest were a separate runner from chat. Commands now say which area they cover.
Each assistant message is one AI trace, grouped by the conversation id. Thumbs, regenerate, and retry post to /api/events with that trace id. The console retrieval transcript is gone.

Co-authored-by: Laurent Cazanove <Strift@users.noreply.github.com>
A setup error ends the PostHog turn. A retry cites only the latest turn. A blocked storage write no longer drops the in-memory conversation id or the chat request.

Co-authored-by: Laurent Cazanove <Strift@users.noreply.github.com>
Tool lines, the answer, sources, and actions now share the 20px gap used between docs blocks.

This branch was successfully deployed

1 active (outdated) deployment
staging — b6c3346a Deployed Dec 1, 2026 by mintlify[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add AI assistant

2 participants